cmake_minimum_required( VERSION 2.8 )
project( CybEngine )

set( CMAKE_MODULE_PATH      ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin )

set( GLEW_LOCATION ${CMAKE_SOURCE_DIR}/../LIBS/glew-1.10.0 )
find_package( OpenGL )
find_package( GLEW REQUIRED )

include_directories(	
	${PROJECT_SOURCE_DIR}
	${GLEW_INCLUDE_DIR}
)

add_subdirectory( external )
add_subdirectory( framework )
add_subdirectory( renderer )
add_subdirectory( samples )

# Add resource files
file( GLOB_RECURSE RESOURCE_FILES ${CMAKE_SOURCE_DIR}/samples/resources/* )
add_custom_target(
	resources ALL
	${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/samples/resources ${PROJECT_BINARY_DIR}/resources
	SOURCES ${RESOURCE_FILES}
)